package com.lucy.wx.miniapp.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.lucy.common.core.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.RequiredArgsConstructor;
import lombok.Setter;
import lombok.ToString;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.io.Serializable;
import java.util.Date;

@Getter
@Setter
@ToString
@RequiredArgsConstructor
@Entity
@Table(name = "wx_mini_grant")
@ApiModel(value = "授权小程序",description = "授权小程序")
public class MiniAppGrant extends BaseEntity implements Serializable {
    @ApiModelProperty("开发者姓名")
    @Column(name = "dev_name")
    String devName;

    @ApiModelProperty("开发者邮箱")
    @Column(name = "dev_email")
    String devEmail;

    @ApiModelProperty("开发者联系方式")
    @Column(name = "dev_mobile")
    String devMobile;

    @ApiModelProperty("小程序名称")
    @Column(name = "app_name")
    String appName;

    @ApiModelProperty("小程序APPID")
    @Column(name = "app_id")
    String appId;

    @ApiModelProperty("小程序APPSECRET")
    @Column(name = "app_secret")
    String appSecret;

    @ApiModelProperty("小程序版本")
    @Column(name = "version")
    String version;

    @ApiModelProperty("授权状态")
    @Column(name = "status")
    Integer status;

    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @ApiModelProperty(value = "到期时间",name = "expireDate")
    @Column(name = "expire_date")
    Date expireDate;

}
